const express = require('express')
const app = express()
const bodyParser = require('body-parser')
const session = require('express-session')
const port = 3000

app.use(bodyParser.urlencoded({ extended: true }))
app.use(bodyParser.json())
app.use(express.static('public'))
app.use(session({ secret: 'A shit app', cookie: { maxAge: 18000000 }}))


//挂载路由
app.use('/',require('./routes'))

app.listen(port)
console.log('server started on: ' + port)